Let's continue with our battle info.
So this is the local script that is on our screen.
Guy telling us whether the battle is beginning or we're just preparing or we won, things like that.
I wanted to break the two lessons up because they're getting kind of long.
So let's go ahead and get started with our battle info.
Luke.
Let's get rid of this print statement and I'll get a variable for replicated storage because we've got
to listen to that remote event.
So we'll do gain get service, replicated storage, we'll put it in the SES variable.
I'm also going to need a variable for my status remote event status RI.
So it's in replicated storage.
Wait for child status RI.
Let's get a variable for the begin sound.
Begin sound.
And we'll say script dot parent.
Was it announcements?
Should we do a wait for child?
Let's do a wait for child Wait for child.
Announcer Begin to what else?
Let's get a variable for our label.
We're going to have to change the text on the label.
We're going to have to make it visible too.
So we have script dot parent and we do await for child wait for child info label.
You could also just do parent.info label.
That'll that'll work.
All right.
So the status RI is going to fire when something happens in the battle.
So we'll do our status RI dot on client event Colon connect function.
We'll get a status and I think I'm going to send a message over to I didn't do that for, for our beginner
our battle manager.
But we'll go back and we'll, we'll clean that up a little bit.
So when we get something from the server side, from our battle manager, we're going to get the label,
we're going to make sure it's visible, right?
So we'll say visible equals true.
Then let's check the status to see what kind of message it is so or remote event it is.
So we'll say if status equals equals, I sent one for begin before.
Let's do one for prepare.
Also.
That's the get ready for the battle.
And in prepare we're going to get a message.
This message right here.
We're going to send it over and then we'll display it.
I'm going to do two other conditions.
We have our prepare.
We're going to have we'll do a control C control V, We're going to have a begin.
Right, begin.
And then I'll do another paste down here and then we're going to have the winner.
I'll just say win.
So we have the text updating exactly the same on each if condition, so we don't really need it in the
if condition.
Let's do a control C, paste it outside of the F's.
Things are going to change though, right?
So prepare.
Let's go ahead and get our sound.
We have a.
Not a begin sound.
Let's just put a note.
We're going to need another sound here.
Sound for Countdown.
And then here we're going to have the sound to begin that begin that begin announcement.
So we'll get our begin Sound colon play.
And then down here we're going to have our wind sound.
Did we get a we don't have a variable for that.
Born a winner.
Let's make a variable.
I'll put it right with the other sound.
Do a local and wind sound equals script dot parent wait for child born a winner.
There we go.
Ctrl C.
Control V, and we'll get to play.
All right.
So the only thing we don't have is for the countdown.
Let's go get a sound for our countdown.
I'm going to do, like, a beep every time a second rolls off, So I'm going to go to my battle royale,
go to Toolbox and Under Marketplace.
My audio is still open.
I'm going to do a search on beep.
And get something really short.
So that's not bad.
That's pretty good.
There's one I liked more.
I think I'll do a two tone.
Like the bebop right here.
Let's just select screen guy.
Insert.
We got our little bebop sound.
Let's close this.
Let's go back to our battle info, Loke, and then I'll call it a beep.
Beep equals script dot parent wait for child and we got our bebop beep bop.
Nice.
I'll put that sound right here.
So say beep.
Oh, you know what that's called?
Beep sound, right?
Everything else is sound.
Let's call it beep sound.
Copy paste, colon play.
All right.
Now we're going to go to our.
Battle manager.
And in here before the battle begins.
Actually, as the battle starts, instead of this printout, let's do our status, Ray, and then we'll
do a fire.
All clients, colon fire, all clients.
And this is prepare and we'll send a message.
The battle begins in something like that.
Let's make it a string.
Let's construct the string.
We don't have a string yet because we're going to want that.
I So I'll do a look str the battle begins in string concatenate our i string concatenate our seconds.
I'll put a little space in here in between these because it's not like the print statements where when
you use your comma, you get some, you get some space put in there by default.
So that string will go in here.
I don't think I'm going to start with or end with zero.
I think I'm going to end with one that'll look better here.
That looks pretty good.
And then this begin right here.
Let's go ahead and we can just put our our string in here.
So begin battle.
All right.
And then there's a winner.
But we haven't done the mechanics for last person standing yet.
I think I'm going to add two more weight statements.
So this bottle right here, it's going to fire off when the server starts up.
Right.
So we have this bottle being called once.
Just be aware that since this is a reserved server, when everybody gets teleported over, this bottle
will fire off because the server is starting up.
But if you have some situation where the server is going to be running, you're going to have to call
this bottle from one of these from something like a player added event.
But we're fine like this.
It should be fine.
Let's go to the first line and just give a three second pause while that while that while people are
being transported in this wait is good, it's one second.
However, our last prepare, which will be one, is not going to show.
It's going to be almost instant because we don't have any waits in here before we send our begin.
So maybe.
Yeah, maybe right here.
Let's do a weight so that we can see that battle begins in one second before we start our begin battle.
All right, let's give this a try.
I'm going to go to my battle royale scene, and we have our label is still visible.
Let's go to info label down on the screen Gooey and the starter gooey.
Click on that.
Make that invisible.
There we go.
Uncheck and we'll hit the play button.
Test this out.
All right.
We're in the world.
I think this is good.
Let the games begin.
And then we got our weapon.
We had our announcement.
I'm liking it.
All right.
I will see you in the next video.
We'll do the win scenario.
The last person standing.